
package org.apache.ocean;

import org.apache.commons.lang.builder.*;
import org.apache.commons.lang.*;

/**
 *
 * @author jasonr
 */
public class IDAndShard {
  public Long id;
  public String shardID;
  
  public IDAndShard(Long id, String shardID) {
    this.id = id;
    this.shardID = shardID;
  }
  
  public boolean equals(Object object) {
    if (!(object instanceof IDAndShard)) return false;
    if (object == null) return false;
    IDAndShard other = (IDAndShard)object;
    return ObjectUtils.equals(id, other.id) && ObjectUtils.equals(shardID, other.shardID);
  }
  
  public int hashCode() {
    HashCodeBuilder builder = new HashCodeBuilder(161, 3);
    builder.append(id);
    builder.append(shardID);
    return builder.toHashCode();
  }
}
